package cn.tedu.rms.base.util;


import java.util.Random;

/**
 * 验证码生成工具类
 */
public class ValidationCode {
    public static String codeGenerate(){
        StringBuilder code = new StringBuilder();//验证码字符串
        Random random = new Random();
        for (int i = 0; i < 6; i++) {
            int num = random.nextInt(10);//[0,10)
            String str = String.valueOf(num);
            code.append(str);
        }
        return code.toString();
    }
}
